import request from '@/router/axios';

//工序配置根据工序id获取工序列表
export const getProcessTree = (processId) => {
    return request({
        url: `/library/profession-tech-basic/get-by-id/${processId}`,
        method: 'get',
    })
} 
//工序配置基本信息获取工序分级&类别
export const getProcessGrade = (params) => {
    return request({
        url: '/blade-system/dict/getSubDictionary',
        method: 'get',
        params
    })
}   

//工序配置基本信息新增信息
export const addProcess = (data) => {
    return request({
        url: '/library/profession-tech-basic/add',
        method: 'post',
        data
    })
}   

//工序配置基本信息修改信息
export const updateProcess = (data) => {
    return request({
        url: '/library/profession-tech-basic/update',
        method: 'post',
        data
    })
}   

//获取工序列表树状结构
export const processTree = (params) => {
    return request({
        url: '/library/profession-tech-process-list/tree',
        method: 'get',
        params
    })
}   

//工序列表树状结构新增
export const processAddTree = (data) => {
    return request({
        url: '/library/profession-tech-process-list/add',
        method: 'post',
        data
    })
} 
//工序列表树状结构编辑
export const processUpadTree = (data) => {
    return request({
        url: '/library/profession-tech-process-list/update',
        method: 'post',
        data
    })
}   

//工序列表树状结构删除
export const processDelTree = (params) => {
    return request({
        url: '/library/profession-tech-process-list/delete/'+params.id,
        method: 'post', 
    })
}  
//工序列表树状结构排序
export const processsortTree = (data) => {
    return request({
        url: '/library/profession-tech-process-list/sort',
        method: 'post', 
        data
    })
}      

